Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/add arm64 image builds #664

Closed

Conversation

xvzf
Copy link

@xvzf xvzf commented Dec 14, 2021

Duplicate of #604 with a different approach

This PR replaces the docker build with docker buildx in order to build a multi-arch docker image. This also automagically pushes the images using buildx as they are not imported to the actual docker system anymore.

It's not changing the Dockerfile and works on M1(Pro) Macs as well as a regular x86 ubuntu server. I'm just not sure how fast GH Actions is.

Signed-off-by: Matthias Riegler [email protected]

Related Issue:

New Behavior

  • It adds the possibility to build multi-arch images (introduced Arm64 🎉 )

Contrast to Current Behavior

  • the --push-only option is gone based on the fact this is using docker buildx

Discussion: Benefits and Drawbacks

Arm64 is evolving; this e.g. allows the image to run on the AWS Graviton EC2 machines.

Proposed Release Note Entry

  • Added support for the arm64 platform

Double Check

  • I have read the comments and followed the PR template.
  • I have explained my PR according to the information in the comments.
  • My PR targets the develop branch.

Note: this also automagically pushes the images using buildx as they are
not imported to the actual docker system anymore.

Signed-off-by: Matthias Riegler <[email protected]>
@xvzf xvzf force-pushed the feat/add-arm64-image-builds branch from 7bb66d8 to 84191b4 Compare December 14, 2021 11:53
@xvzf xvzf mentioned this pull request Dec 14, 2021
3 tasks
@cimnine
Copy link
Collaborator

cimnine commented Feb 3, 2022

Thank you the PR. It is indeed a valid approach to just build the current Alpine based system for arm64. And I'm inclined to eventually merge it until we're ready with the Debian based approach.

But not in the state it currently is, because your PR does only half the job, unfortunatley. It lacks the adjustments to the automated builds, i.e. to our GitHub actions. Do you have the capacity to look into it?

Don't worry if you dont. But if you have, please don't proceed just now! First I would like to discuss with @tobiasge how we want to proceed with the Debian based approach. (E.g. whether we find the resources to push it forward anytime soon or whether this approach would be a good intermediate solution.)

Also – at least for now – I would suggest to not set the platforms by default (see https://github.com/netbox-community/netbox-docker/pull/664/files#diff-4d2a8eefdf2a9783512a35da4dc7676a66404b6f3826a8af9aad038722da6823R208).
It should be changed so that platforms can be specified optionally, but the default should still be a single build for the CPU arch of the user's machine. That's the minimal change I request for this PR to be mergeable.

@tobiasge
Copy link
Member

tobiasge commented Feb 8, 2022

The Debian based approach still has the problem with the Postgres client that won't install correctly in the ARM64 image. From the linked issue I don't see a solution for that coming soon. So if we do want do provide an ARM64 image, I think this is a good intermediate solution. (With your requested change added).

@tobiasge
Copy link
Member

Superseded by #797

@tobiasge tobiasge closed this Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants